﻿<%@ Page AutoEventWireup="true" CodeBehind="PersonTasks.aspx.cs" Inherits="TaskWebApplicationUI.PersonTasksView"
         Language="C#" MasterPageFile="WebTasksMaster.Master" Theme="TaskTheme" ValidateRequest="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MasterPagePlaceHolder" runat="server">
    <p align="center">
        <asp:Label ID="Department" runat="server" Text="Во всех отделах" Font-Bold="False"
                   SkinID="Department"></asp:Label></p>
    <asp:DataList ID="ExecutorsList" runat="server" OnItemDataBound="ExecutorsList_ItemDataBound"
                  Width="100%">
        <ItemTemplate>
            <br />
            &nbsp;
            <asp:Image ID="Image2" runat="server" ImageUrl='<%#"images/" + DataBinder.Eval(Container.DataItem,
                                                         "FullName")%>' />
            <asp:Label ID="Label1" runat="server" Text="(всего:" SkinID="Executor"></asp:Label>
            <asp:Label ID="TaskCountLabel" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CountTask")%>'
                       SkinID="Executor"></asp:Label>
            <asp:Label ID="Label2" runat="server" Text=")" SkinID="Executor"></asp:Label>
            <%-- <br />--%>
            <asp:GridView ID="TasksListGridView" runat="server" AutoGenerateColumns="False" BorderWidth="1px"
                          CssClass="grid-view" GridLines="None" CellPadding="4" BorderStyle="None" Width="100%"
                          AllowSorting="True" OnSorting="TasksListGridView_Sorting" EnableModelValidation="True">
                <%--  <AlternatingRowStyle BackColor="White"></AlternatingRowStyle>--%>
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl="images/dot.gif" Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Right" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="">
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Left" />
                        <ItemStyle CssClass="bodyt" Width="1%" Wrap="False" HorizontalAlign="Left" Font-Size="10pt" />
                    </asp:BoundField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#Eval("HyperLink")%>'
                                           Text='<%#Eval("TaskName")%>'></asp:HyperLink>
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Left" />
                        <ItemStyle CssClass="bodyt" HorizontalAlign="Left" Wrap="False" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl="images/exclamation.gif" Visible='<%#Eval("ImageLink.Exclamation")%>'
                                       Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Left" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl="images/reminder.gif" Visible='<%#Eval("ImageLink.Reminder")%>'
                                       Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Left" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl="images/participant.gif" Visible='<%#Eval("ImageLink.iamParticipant")%>'
                                       Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Left" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:BoundField HtmlEncode="false" HeaderText="Владелец" DataField="Owner" SortExpression="Owner">
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Right" />
                        <ItemStyle CssClass="bodyt" Width="15%" Wrap="False" HorizontalAlign="Right" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderText="Отдел" DataField="Department" SortExpression="Department">
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Right" />
                        <ItemStyle CssClass="bodyt" Width="7%" Wrap="False" HorizontalAlign="Right" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Создана"
                                    DataFormatString="{0:d} {0:t}" DataField="DateCreate" SortExpression="DateCreate">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="5%" Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Срок"
                                    DataFormatString="{0:d} {0:t}" DataField="DateExpiration" SortExpression="DateExpiration">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="5%" Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Запись"
                                    DataFormatString="{0:d}" DataField="DateLastComment" SortExpression="DateLastComment">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="3%" Wrap="False" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Важность"
                                    DataField="Priority" SortExpression="Priority">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="1%" Wrap="False" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="%" DataField="Complete">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="1%" Wrap="False" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderText="Тег" DataField="Tag" SortExpression="Tag">
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Center" />
                        <ItemStyle CssClass="bodyt" Width="5%" Wrap="False" HorizontalAlign="Left" />
                    </asp:BoundField>
                </Columns>
                <%--   <RowStyle BackColor="#F7F7DE"></RowStyle>--%>
            </asp:GridView>
        </ItemTemplate>
    </asp:DataList>
    <asp:DataList ID="DataList1" runat="server" OnItemDataBound="DataList1_ItemDataBound"
                  Width="100%">
        <ItemTemplate>
            <%-- <br />
            &nbsp;--%>
            <asp:Image ID="Image2" runat="server" ImageUrl='<%#"images/" + DataBinder.Eval(Container.DataItem, "FullName")%>' />
            <asp:Label ID="Label1" runat="server" Text="(всего:" SkinID="Executor"></asp:Label>
            <asp:Label ID="TaskCountLabel" runat="server" Text='<%#DataBinder.Eval(Container.DataItem, "CountTask")%>'
                       SkinID="Executor"></asp:Label>
            <asp:Label ID="Label2" runat="server" Text=")" SkinID="Executor"></asp:Label>
            <br />
            <asp:GridView ID="TasksListGridView" runat="server" AutoGenerateColumns="False" BorderWidth="1px"
                          CssClass="grid-view" GridLines="None" CellPadding="4" BorderStyle="None" Width="100%"
                          AllowSorting="True" OnSorting="TasksListGridView_Sorting" EnableModelValidation="True">
                <%--<AlternatingRowStyle BackColor="White"></AlternatingRowStyle>--%>
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl="images/dot.gif" Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Right" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="">
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Left" />
                        <ItemStyle CssClass="bodyt" Width="1%" Wrap="False" HorizontalAlign="Left" Font-Size="10pt" />
                    </asp:BoundField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#Eval("HyperLink")%>'
                                           Text='<%#Eval("TaskName")%>'></asp:HyperLink>
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Left" />
                        <ItemStyle CssClass="bodyt" HorizontalAlign="Left" Wrap="False" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl="images/exclamation.gif" Visible='<%#Eval("ImageLink.Exclamation")%>'
                                       Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Left" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl="images/reminder.gif" Visible='<%#Eval("ImageLink.Reminder")%>'
                                       Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Left" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:Image ID="Image1" runat="server" ImageUrl="images/participant.gif" Visible='<%#Eval("ImageLink.iamParticipant")%>'
                                       Height="15" />
                        </ItemTemplate>
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Left" />
                        <ItemStyle CssClass="bodyt" Width="15" />
                    </asp:TemplateField>
                    <asp:BoundField HtmlEncode="false" HeaderText="Исполнитель" DataField="Owner" SortExpression="Owner">
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Right" />
                        <ItemStyle CssClass="bodyt" Width="15%" Wrap="False" HorizontalAlign="Right" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderText="Отдел" DataField="Department" SortExpression="Department">
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Right" />
                        <ItemStyle CssClass="bodyt" Width="7%" Wrap="False" HorizontalAlign="Right" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Создана"
                                    DataFormatString="{0:d} {0:t}" DataField="DateCreate" SortExpression="DateCreate">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="5%" Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Срок"
                                    DataFormatString="{0:d} {0:t}" DataField="DateExpiration" SortExpression="DateExpiration">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="5%" Wrap="False" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Запись"
                                    DataFormatString="{0:d}" DataField="DateLastComment" SortExpression="DateLastComment">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="3%" Wrap="False" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="Важность"
                                    DataField="Priority" SortExpression="Priority">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="1%" Wrap="False" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderStyle-CssClass="bodyt" HeaderText="%" DataField="Complete">
                        <HeaderStyle CssClass="bodyt" />
                        <ItemStyle CssClass="bodyt" Width="0.5%" Wrap="False" HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HtmlEncode="false" HeaderText="Тег" DataField="Tag" SortExpression="Tag">
                        <HeaderStyle CssClass="bodyt" HorizontalAlign="Center" />
                        <ItemStyle CssClass="bodyt" Width="5%" Wrap="False" HorizontalAlign="Left" />
                    </asp:BoundField>
                </Columns>
                <%-- <RowStyle BackColor="#F7F7DE"></RowStyle>--%>
            </asp:GridView>
        </ItemTemplate>
    </asp:DataList>
</asp:Content>